home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
program
/
prtfrm51.zip
/
FRMSRC.ZIP
/
FDEMO11.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-06-21
|
1KB
|
63 lines
unit Fdemo11;
interface
uses WinTypes, WinProcs, Classes, Graphics, Forms, Controls, Buttons,
StdCtrls, ExtCtrls, Printers, PrnWin, CB_Types;
type
TForm11 = class(TForm)
CancelBtn: TBitBtn;
Bevel1: TBevel;
ListBox1: TListBox;
preview: TBitBtn;
PrintWin1: TPrintWin;
Panel1: TPanel;
Label2: TLabel;
Shape1: TShape;
procedure previewClick(Sender: TObject);
procedure FormActivate(Sender: TObject);
private
{ Private declarations }
public
end;
var
Form11: TForm11;
implementation
{$R *.DFM}
procedure TForm11.previewClick(Sender: TObject);
var
i: Integer;
y: Real;
begin
PrintWin1.BeginPrint;
PrintWin1.NewFont ('Arial', 20, True, True, True);
PrintWin1.DrawWindow (1,poCenter, Panel1);
y := 2.0;
for i := 1 to ListBox1.Items.Count-1 do begin
PrintWin1.NewFont (ListBox1.Items[i], 16, False, False, False);
PrintWin1.Drawtext( y,poLeft, ListBox1.Items[i]);
PrintWin1.Drawtext( y,poCenter, ListBox1.Items[i]);
PrintWin1.Drawtext( y,poRight, ListBox1.Items[i]);
y := y+0.2;
if y > PrintWin1.PageHeight-1 then begin
PrintWin1.NewPage;
y := 2.0;
end;
end;
PrintWin1.EndPrint;
end;
procedure TForm11.FormActivate(Sender: TObject);
begin
ListBox1.Items := Printer.Fonts;
end;
end.